package com.kerrykidz.scminvoicing.dao.model;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.kerrykidz.system.util.DateUtil;
import com.kerrykidz.workflow.vo.WorkflowVo;
import com.rdp.framework.core.model.MyBatisSuperModel;

public class ScmPayformEntity  extends MyBatisSuperModel{
    
    private String pkPayformId;
    private String fkFlowinstId;
    private String status;
    private String fkSupId;
    private String checkNo;
    private String cableNo;
    private String creditNo;
    private String fkBranId;
    private String delFlag;
    private String applyBy;
    private Date applyTime;
    private String applyTimeStr;
    private String modiBy;
    private Date modiTime;
    private String startApplyTime;
    private String endApplyTime;
    private WorkflowVo workflowVo;
    private List<ScmPayformOrderEntity> scmPayformOrderList;
    private String fkPurOrders;
    /**
     * 申请人名称
     */
    private String userName;
    private String userId;
    /**
     * 供应商名称
     */
    private String supName;
    
    private String payInfo;//支付信息
    public String getPkPayformId() {
        return pkPayformId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.PK_PAYFORM_ID
     *
     * @param pkPayformId the value for scm_payform.PK_PAYFORM_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setPkPayformId(String pkPayformId) {
        this.pkPayformId = pkPayformId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.FK_FLOWINST_ID
     *
     * @return the value of scm_payform.FK_FLOWINST_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getFkFlowinstId() {
        return fkFlowinstId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.FK_FLOWINST_ID
     *
     * @param fkFlowinstId the value for scm_payform.FK_FLOWINST_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkFlowinstId(String fkFlowinstId) {
        this.fkFlowinstId = fkFlowinstId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.STATUS
     *
     * @return the value of scm_payform.STATUS
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getStatus() {
        return status;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.STATUS
     *
     * @param status the value for scm_payform.STATUS
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.FK_SUP_ID
     *
     * @return the value of scm_payform.FK_SUP_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getFkSupId() {
        return fkSupId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.FK_SUP_ID
     *
     * @param fkSupId the value for scm_payform.FK_SUP_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkSupId(String fkSupId) {
        this.fkSupId = fkSupId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.CHECK_NO
     *
     * @return the value of scm_payform.CHECK_NO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getCheckNo() {
        return checkNo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.CHECK_NO
     *
     * @param checkNo the value for scm_payform.CHECK_NO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setCheckNo(String checkNo) {
        this.checkNo = checkNo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.CABLE_NO
     *
     * @return the value of scm_payform.CABLE_NO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getCableNo() {
        return cableNo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.CABLE_NO
     *
     * @param cableNo the value for scm_payform.CABLE_NO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setCableNo(String cableNo) {
        this.cableNo = cableNo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.CREDIT_NO
     *
     * @return the value of scm_payform.CREDIT_NO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getCreditNo() {
        return creditNo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.CREDIT_NO
     *
     * @param creditNo the value for scm_payform.CREDIT_NO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setCreditNo(String creditNo) {
        this.creditNo = creditNo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.FK_BRAN_ID
     *
     * @return the value of scm_payform.FK_BRAN_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getFkBranId() {
        return fkBranId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.FK_BRAN_ID
     *
     * @param fkBranId the value for scm_payform.FK_BRAN_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkBranId(String fkBranId) {
        this.fkBranId = fkBranId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.DEL_FLAG
     *
     * @return the value of scm_payform.DEL_FLAG
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getDelFlag() {
        return delFlag;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.DEL_FLAG
     *
     * @param delFlag the value for scm_payform.DEL_FLAG
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getApplyTimeStr() {
    	if(null != this.applyTime){
    		applyTimeStr = DateUtil.formatDate("yyyy-MM-dd HH:mm:ss", this.applyTime);
    	}
		return applyTimeStr;
	}

	public void setApplyTimeStr(String applyTimeStr) {
		this.applyTimeStr = applyTimeStr;
	}

	/**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.APPLY_BY
     *
     * @return the value of scm_payform.APPLY_BY
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getApplyBy() {
        return applyBy;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.APPLY_BY
     *
     * @param applyBy the value for scm_payform.APPLY_BY
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setApplyBy(String applyBy) {
        this.applyBy = applyBy;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_payform.APPLY_TIME
     *
     * @return the value of scm_payform.APPLY_TIME
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public Date getApplyTime() {
        return applyTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_payform.APPLY_TIME
     *
     * @param applyTime the value for scm_payform.APPLY_TIME
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

	public String getModiBy() {
		return modiBy;
	}

	public void setModiBy(String modiBy) {
		this.modiBy = modiBy;
	}

	public Date getModiTime() {
		return modiTime;
	}

	public void setModiTime(Date modiTime) {
		this.modiTime = modiTime;
	}

	public String getStartApplyTime() {
		return startApplyTime;
	}

	public void setStartApplyTime(String startApplyTime) {
		this.startApplyTime = startApplyTime;
	}

	public String getEndApplyTime() {
		return endApplyTime;
	}

	public void setEndApplyTime(String endApplyTime) {
		this.endApplyTime = endApplyTime;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getSupName() {
		return supName;
	}

	public void setSupName(String supName) {
		this.supName = supName;
	}

	public WorkflowVo getWorkflowVo() {
		return workflowVo;
	}

	public void setWorkflowVo(WorkflowVo workflowVo) {
		this.workflowVo = workflowVo;
	}

	public List<ScmPayformOrderEntity> getScmPayformOrderList() {
		return scmPayformOrderList;
	}

	public void setScmPayformOrderList(
			List<ScmPayformOrderEntity> scmPayformOrderList) {
		this.scmPayformOrderList = scmPayformOrderList;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getFkPurOrders() {
		return fkPurOrders;
	}

	public void setFkPurOrders(String fkPurOrders) {
		this.fkPurOrders = fkPurOrders;
	}

	public String getPayInfo() {
		if(StringUtils.isNotBlank(this.checkNo))
			payInfo = "支票号:"+this.checkNo;
		else if(StringUtils.isNotBlank(this.cableNo))
			payInfo = "电汇票号:"+this.cableNo;
		else if(StringUtils.isNotBlank(this.creditNo))
			payInfo = "贷记票号:"+this.creditNo;
		return payInfo;
	}

	public void setPayInfo(String payInfo) {
		this.payInfo = payInfo;
	}
	
}